package com;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.TransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.annotation.TransactionManagementConfigurer;

@SpringBootApplication
@MapperScan("com.mapper") //扫描接口文件
@EnableScheduling
@ComponentScan(basePackages= {"com", "org.n3r.idworker"})
@EnableTransactionManagement
public class FantuanApplication implements TransactionManagementConfigurer{


	public static void main(String[] args) {
		System.setProperty("es.set.netty.runtime.available.processors","false");
		SpringApplication.run(FantuanApplication.class, args);
	}


	@Override
	public TransactionManager annotationDrivenTransactionManager() {
		return null;
	}
//	@Bean
//	public InternalResourceViewResolver setupViewResolver() {
//		InternalResourceViewResolver resolver = new InternalResourceViewResolver();
//		/** 设置视图路径的前缀 */
//		resolver.setPrefix("/WEB-INF/jsp/");
//		/** 设置视图路径的后缀 */
//		resolver.setSuffix(".jsp");
//		return resolver;
//	}


}
